package com.lyz.dataStructure.algorithm.beike2020;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 20:17
 * @Description:
 **/

import java.util.Arrays;
import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/8/10 20:17
 *@Description:
 **/
public class Main3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N= sc.nextInt();
        int[] arr = new int[N];
        for(int i =0;i<arr.length;i++){
            arr[i] = sc.nextInt();
        }
        System.out.println(shu(arr,N));
    }
    public static int shu(int[] arr,int n){
        Arrays.sort(arr);
        int m =0;
        for(int i =0;i<n-1;i++){
            for(int j =i+1;j<n;j++){
                int min = Math.min(arr[i],arr[j]);
                int max = Math.max(arr[i],arr[j]);
                if(min>=max*0.9)
                    m++;
                else
                    break;
            }
        }
        return m;
    }
}
